package com.ruoyi.share.service.impl;

import java.util.List;

import com.ruoyi.share.domain.ShareOrderDistributionRecord;
import com.ruoyi.share.service.IShareOrderDistributionRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.share.mapper.ShareOrderDistributionRecordMapper;

/**
 * 订单分账记录Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-16
 */
@Service
public class ShareOrderDistributionRecordServiceImpl implements IShareOrderDistributionRecordService
{
    @Autowired
    private ShareOrderDistributionRecordMapper shareOrderDistributionRecordMapper;

    /**
     * 查询订单分账记录
     *
     * @param id 订单分账记录主键
     * @return 订单分账记录
     */
    @Override
    public ShareOrderDistributionRecord selectShareOrderDistributionRecordById(Long id)
    {
        return shareOrderDistributionRecordMapper.selectShareOrderDistributionRecordById(id);
    }

    /**
     * 查询订单分账记录列表
     *
     * @param shareOrderDistributionRecord 订单分账记录
     * @return 订单分账记录
     */
    @Override
    public List<ShareOrderDistributionRecord> selectShareOrderDistributionRecordList(ShareOrderDistributionRecord shareOrderDistributionRecord)
    {
        return shareOrderDistributionRecordMapper.selectShareOrderDistributionRecordList(shareOrderDistributionRecord);
    }

    /**
     * 新增订单分账记录
     *
     * @param shareOrderDistributionRecord 订单分账记录
     * @return 结果
     */
    @Override
    public int insertShareOrderDistributionRecord(ShareOrderDistributionRecord shareOrderDistributionRecord)
    {
        return shareOrderDistributionRecordMapper.insertShareOrderDistributionRecord(shareOrderDistributionRecord);
    }

    /**
     * 修改订单分账记录
     *
     * @param shareOrderDistributionRecord 订单分账记录
     * @return 结果
     */
    @Override
    public int updateShareOrderDistributionRecord(ShareOrderDistributionRecord shareOrderDistributionRecord)
    {
        return shareOrderDistributionRecordMapper.updateShareOrderDistributionRecord(shareOrderDistributionRecord);
    }

    /**
     * 批量删除订单分账记录
     *
     * @param ids 需要删除的订单分账记录主键
     * @return 结果
     */
    @Override
    public int deleteShareOrderDistributionRecordByIds(Long[] ids)
    {
        return shareOrderDistributionRecordMapper.deleteShareOrderDistributionRecordByIds(ids);
    }

    /**
     * 删除订单分账记录信息
     *
     * @param id 订单分账记录主键
     * @return 结果
     */
    @Override
    public int deleteShareOrderDistributionRecordById(Long id)
    {
        return shareOrderDistributionRecordMapper.deleteShareOrderDistributionRecordById(id);
    }
}
